﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BLL;

namespace TieuLuanWindowsNC
{
    public partial class frmThemPhong : Form
    {
        LoaiPhongBLL loaiPhongBLL = new LoaiPhongBLL();
        PhongBLL phongBLL = new PhongBLL();

        public frmThemPhong()
        {
            InitializeComponent();
        }

        private void frmThemPhong_Load(object sender, EventArgs e)
        {
            cboLoaiPhong_Them.DataSource = loaiPhongBLL.getAllLoaiPhong();
            cboLoaiPhong_Them.DisplayMember = "TenLoaiPhong";
            cboLoaiPhong_Them.ValueMember = "MaLP";
        }

        private void btnThemPhong_Click(object sender, EventArgs e)
        {
            phongBLL.addPhong(cboLoaiPhong_Them.SelectedValue.ToString());
        }
    }
}
